<?php
namespace App\Mappers;

use App\Core\Entity\BaseEntity;

abstract class DataMapper extends BaseEntity
{

    public function __construct(array $param = [])
    {
        foreach ($param as $key => $value) {
            $this->$key = $value;
        }
    }

    public function isValid($key)
    {
        return isset($this->$key) && ! empty($this->$key) ? true : false;
    }

    abstract public function make();
}